#include "..\StrConverter\strconverter.h"
#include <iostream>
using namespace std;

#pragma comment(lib, "..\\Debug\\StrConverter.lib")

int main()
{
	char *aStr = "hello world!";
	wchar_t *wStr = L"hello world!";
	int unicodeLen;
	int ansiLen;

	unicodeLen = ANSI2Unicode(aStr, NULL);
	wchar_t* pUnicode1 = new wchar_t[unicodeLen];
	ANSI2Unicode(aStr, pUnicode1);
	wcout<<pUnicode1<<endl;
	delete[]pUnicode1;


	ansiLen = Unicode2ANSI(wStr, NULL);
	char *pAnsi1 = new char[ansiLen];
	Unicode2ANSI(wStr, pAnsi1);
	cout<<pAnsi1<<endl;
	delete []pAnsi1;

	unicodeLen = UTF82Unicode(aStr, NULL);
	wchar_t* pUnicode2 = new wchar_t[unicodeLen];
	ANSI2Unicode(aStr, pUnicode2);
	wcout<<pUnicode2<<endl;
	delete[]pUnicode2;


	int utf8Len = Unicode2UTF8(wStr, NULL);
	char *pUtf8 = new char[utf8Len];
	Unicode2ANSI(wStr, pUtf8);
	cout<<pUtf8<<endl;
	delete []pUtf8;

	wcout<<ANSI2Unicode("hello world!")<<endl;
	cout<<Unicode2ANSI(L"hello world!")<<endl;
	wcout<<UTF82Unicode("hello world!")<<endl;
	cout<<Unicode2UTF8(L"hello world!")<<endl;
}
